home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / Install_StormMesa < prev    next >
Text File  |  1999-02-05  |  8KB  |  312 lines

  1. ; $VER: Install_StormMesa 1.0
  2. ; By Hans-Jörg Frieden
  3.  
  4. ; English text
  5. (procedure english-text (
  6.     (set #yes "Yes")
  7.     (set #no  "No")
  8.     (set #welcome (cat
  9.         "Welcome to the installation of StormMesa 3.0")
  10.     )
  11.     (set #dest-prompt (cat
  12.         "Please select a place where you want StormMesa to be installed. "
  13.         "(No new drawer will be created). To perform an upgrade, you "
  14.         "should use 'mesa:'")
  15.     )
  16.     (set #main-copy-msg "Copying StormMesa...")
  17.     (set #libs-copy-msg "Copying shared library to LIBS: ")
  18.     (set #startup-prompt
  19.         (cat "Your User-Startup must be modified. This will add the command\n"
  20.              "\"assign mesa: "
  21.         )
  22.     )
  23.     (set #startup-prompt-2 "\"\nto your user-startup.")
  24.     (set #stat-prompt (cat
  25.         "Do you want to see statistical information about 3D-Hardware "
  26.         "usage after an OpenGL application has been run from a shell?")
  27.     )
  28.     (set #noclamp-prompt (cat
  29.         "You seem to have a CyberVision3D hardware installed. Therefore "
  30.         "you should enable the env variable MESA/NOCLAMP, if you want "
  31.         "StormMesa to use the Virge's 3D features. Don't set this variable "
  32.         "if you want to use another 3D chip for hardware acceleration\n\n"
  33.         "Enable the variable MESA/NOCLAMP?")
  34.     )
  35.     (set #triple-prompt (cat
  36.         "This StormMesa version supports triple buffering, which can "
  37.         "accelerate demos in fullscreen mode. Triple buffering should "
  38.         "not be used for graphics boards with less than 8MB RAM\n\n"
  39.         "Enable triple buffering?")
  40.     )
  41.     (set #aga-prompt (cat
  42.         "If StormMesa 3.0 should be used under AGA and you have OS 3.0, "
  43.         "the \"NewWPA8\"-Patch must be installed. Do you want to copy it "
  44.         "to the C Drawer?")
  45.     )
  46.     (set #aga-copy "Copying NewWPA8 to C:")
  47.     (set #aga-msg (cat
  48.         "Note: This patch must be executed in your startup-sequence. Installer "
  49.         "can not do this automatically, you'll have to manually add the line\n"
  50.         "C:NewWPA8\n"
  51.         "in your startup-sequence, directly after the \"SetPatch\" call.")
  52.     )
  53.     (set #exit-msg (cat
  54.         "Installation is now complete. Now you can get and install "
  55.         "the demo archives with many example programs to test "
  56.         "the StormMesa software.")
  57.     )
  58. ))
  59.  
  60.  
  61. ; German text
  62. (procedure german-text (
  63.     (set #yes "Ja")
  64.     (set #no  "Nein")
  65.     (set #welcome (cat
  66.         "Willkommen zur Installation von StormMesa 3.0")
  67.     )
  68.     (set #dest-prompt (cat
  69.         "Bitte wählen Sie ein Verzeichnis aus, in das StormMesa installiert werden "
  70.         "soll (es wird keine neue Schublade erstellt). Um einen Upgrade "
  71.         "durchzuführen, verwenden Sie am besten 'mesa:'")
  72.     )
  73.     (set #main-copy-msg "Die StormMesa-Dateien werden kopiert...")
  74.     (set #libs-copy-msg "Kopiere Shared Library nach LIBS: ")
  75.     (set #startup-prompt
  76.         (cat "Ihre User-Startup Datei wird modifiziert und die Zeile\n"
  77.              "\"Assign mesa: "
  78.         )
  79.     )
  80.     (set #startup-prompt-2 "\"\nwird hinuzugefügt")
  81.     (set #stat-prompt (cat
  82.         "Sollen nach Beendigung einer OpenGL-Aplikation statistische "
  83.         "Angaben über die Benutzung von vorhandener 3D-Hardware in der "
  84.         "Shell ausgegeben werden?")
  85.     )
  86.     (set #noclamp-prompt (cat
  87.         "Es scheint eine CyberVision3D-Hardware installiert zu sein. Deswegen "
  88.         "sollte die Env-Variable MESA/NOCLAMP gesetzt sein, wenn der Virge "
  89.         "fuer die Grafikausgabe genutzt werden soll. Diese Variable sollte "
  90.         "nicht gesetzt werden, wenn ein anderer 3D-Chip fuer die Ausgabe "
  91.         "genutzt werden soll\n\n"
  92.         "Soll die Variable MESA/NOCLAMP gesetzt werden?")
  93.     )
  94.     (set #triple-prompt (cat
  95.         "Dieser StormMesa-Release unterstuetzt Triple-Buffering, welches "
  96.         "Demos im Fullscreen-Modus beschleunigen kann. Triple-Buffering "
  97.         "sollte nicht mit Grafikkarten verwendet werden, welche weniger "
  98.         "als 8MB RAM haben\n\n"
  99.         "Soll Triple-Buffering aktiviert werden?")
  100.     )
  101.     (set #aga-prompt (cat
  102.         "Wenn StormMesa 3.0 im AGA-Modus verwendet wird und OS 3.0 vorhanden "
  103.         "ist, dann muss der \"NewWPA8\"-Patch installiert werden. Soll der Patch "
  104.         "ins C-Verzeichnis kopiert werden?")
  105.     )
  106.     (set #aga-copy "Kopiere NewWPA8 nach C:")
  107.     (set #aga-msg (cat
  108.         "Hinweis: Damit dieser Patch wirksam wird, muss in der Startup-Sequence "
  109.         "(am besten direkt hinter SetPatch) folgende Zeile eingefügt werden:\n"
  110.         "C:NewWPA8\n"
  111.         "Dieser Installer führt diese Änderung nicht durch, dies muß mit einem "
  112.         "Texteditor nachträglich gemacht werden.")
  113.     )
  114.     (set #exit-msg (cat
  115.         "Die Installation ist nun vollständig. Jetzt können Sie "
  116.         "die Demo-Archive mit vielen Beispielprogrammen besorgen "
  117.         "und installieren und so die StormMesa-Software ausprobieren".)
  118.     )
  119. ))
  120.  
  121. ;
  122. ; Procedure to copy a single library
  123. (procedure P_copy_single arg1
  124.     (if (exists (arg1))
  125.     (copylib
  126.         (confirm)
  127.         (prompt (cat #libs-copy-msg (fileonly(arg1))))
  128.         (help @copylib-help)
  129.         (source arg1)
  130.         (dest "LIBS:")
  131.         (optional "oknodelete" "askuser")
  132.     )
  133.     )
  134. )
  135.  
  136. ;
  137. ; How can it be there's no way of specifying an environment variable?
  138. (procedure P_setenv arg1 arg2
  139.     (
  140.         (if (exists (tackon "ENV:" arg1) (noreq))
  141.             (delete (tackon "ENV:" arg1))
  142.         )
  143.         (if (exists (tackon "ENVARC:" arg1) (noreq))
  144.             (delete (tackon "ENVARC:" arg1))
  145.         )
  146.         (textfile
  147.             (dest (tackon "ENV:" arg1))
  148.             (append arg2)
  149.         )
  150.         (textfile
  151.             (dest (tackon "ENVARC:" arg1))
  152.             (append arg2)
  153.         )
  154.     )
  155. )
  156.  
  157. ; Load corresponding strings
  158. (if (= @language "deutsch")
  159.     (german-text)
  160.     (english-text)
  161. )
  162.  
  163. (welcome #welcome)
  164.  
  165. (if (exists "mesa:" (noreq))
  166.     (set #defdest "mesa:")
  167.     (
  168.         (if (= @user-level 0)
  169.           (
  170.         (if (not (exists "Work:StormMesa" (noreq)))
  171.             (makedir "Work:StormMesa")
  172.         )
  173.         (set #defdest "Work:StormMesa")
  174.           )
  175.           (set #defdest "Work:")
  176.         )
  177.     )
  178. )
  179. (set #defdest
  180.     (askdir
  181.         (prompt #dest-prompt)
  182.         (help @askdir-help)
  183.         (default #defdest)
  184.     )
  185. )
  186. (set @default-dest #defdest)
  187. (copyfiles
  188.     (prompt #main-copy-msg)
  189.     (help @copyfiles-help)
  190.     (source "AMIGA")
  191.     (dest (tackon #defdest "AMIGA"))
  192.     (all)
  193.     (infos)
  194.     (optional "oknodelete" "askuser")
  195. )
  196.  
  197.  
  198. ; modify user-startup
  199. (if (NOT (exists "mesa:" (noreq)))
  200.     ((startup "StormMesa"
  201.     (prompt (cat
  202.         #startup-prompt
  203.         #defdest
  204.         #startup-prompt-2
  205.     ))
  206.     (command (cat "Assign mesa: " #defdest))
  207.     (help @startup-help)
  208.     )
  209.     (makeassign "mesa" #defdest (safe)))
  210. )
  211.  
  212.  
  213.  
  214.  
  215. ; Copy shared libraries
  216. ; Single copy, because that's the only way to do version checking
  217. (P_copy_single "AMIGA/slibs/agl.library")
  218. (P_copy_single "AMIGA/slibs/aglu.library")
  219. (P_copy_single "AMIGA/slibs/aglut.library")
  220. (P_copy_single "AMIGA/slibs/agle.library")
  221. (P_copy_single "AMIGA/slibs/aglsmap.library")
  222. (P_copy_single "AMIGA/slibs/aglppc.library")
  223. (P_copy_single "AMIGA/slibs/agluppc.library")
  224. (P_copy_single "AMIGA/slibs/aglutppc.library")
  225. (P_copy_single "AMIGA/slibs/agleppc.library")
  226. (P_copy_single "AMIGA/slibs/aglsmapppc.library")
  227.  
  228. ; Create MESA and GLUT dirs in ENV:
  229. (makedir "ENV:MESA")
  230. (makedir "ENV:GLUT")
  231. (makedir "ENVARC:MESA")
  232. (makedir "ENVARC:GLUT")
  233.  
  234. ; - Ask and set MESA/STATS
  235. (set #stat
  236.     (askchoice
  237.         (prompt #stat-prompt)
  238.         (help @askchoice-help)
  239.         (choices #yes #no)
  240.         (default 0)
  241.     )
  242. )
  243. (if (= #stat 0)
  244.     (P_setenv "MESA/STATS" "1")
  245.     (P_setenv "MESA/STATS" "0")
  246. )
  247.  
  248. ; - Set MESA/NOCLAMP
  249. (if (exists "Devs:Monitors/CVision3D" (noreq))
  250.     (
  251.     (set #noclamp
  252.         (askchoice
  253.             (prompt #noclamp-prompt)
  254.             (help @askchoice-help)
  255.             (choices #yes #no)
  256.             (default 1)
  257.         )
  258.     )
  259.     (if (= #noclamp 0)
  260.         (P_setenv "MESA/NOCLAMP" "1")
  261.         (P_setenv "MESA/NOCLAMP" "0")
  262.     )
  263.     )
  264.     (
  265.         (P_setenv "MESA/NOCLAMP" "0")
  266.     )
  267. )
  268. (P_setenv "MESA/LOCKMODE" "3")
  269.  
  270. (set #triple
  271.     (askchoice
  272.         (prompt #triple-prompt)
  273.         (help @askchoice-help)
  274.         (choices #yes #no)
  275.         (default 0)
  276.     )
  277. )
  278. (if (= #triple 0)
  279.     (P_setenv "MESA/TRIPLE" "1")
  280.     (P_setenv "MESA/TRIPLE" "0")
  281. )
  282.  
  283.  
  284. ; - More env variables
  285. (P_setenv "MESA/FORCE_DB" "1")
  286. (P_setenv "GLUT/FORCE_DB" "1")
  287.  
  288. ; - Try to evaluate if NewWPA8 is required
  289. (if (= (database "chiprev") "AA")
  290.     (set #hasaga 1)
  291.     (set #hasaga 0)
  292. )
  293.     (if (= #hasaga 1)
  294.         (
  295.             (if (= (askchoice (prompt #aga-prompt) (help @askchoice-help) (choices #yes #no) (default 1) ) 0)
  296.                 (
  297.                     (copyfiles
  298.                         (prompt #aga-copy)
  299.                         (help @copyfiles-help)
  300.                         (source "AMIGA/misc/NewWPA8/NewWPA8")
  301.                         (dest "C:")
  302.                         (optional "oknodelete force")
  303.                         (confirm)
  304.                     )
  305.                     (message #aga-msg)
  306.                 )
  307.             )
  308.         )
  309.     )
  310.  
  311. (exit #exit-msg)
  312.